#ifndef TCPSERVERMANAGE_H
#define TCPSERVERMANAGE_H

#include "AbstractManage.h"

#include <QTcpServer>

class TcpServerManage : public AbstractManage
{
	Q_OBJECT

public:
	TcpServerManage(const int &handleMaxThreadCount = 2, QObject * parent = 0);

	~TcpServerManage();

	bool listen(const QHostAddress &address, const quint16 &port);

private:
	bool isRunning();

	bool onStart();

	void onFinish();

private:
	QPointer< QTcpServer> tcpServer_;

	QHostAddress listenAddress_;
	quint16 listenPort_;
};


#endif // TCPSERVERMANAGE_H
